package com.boat.sample.support.infrastructure.config;

import org.springframework.boot.web.servlet.error.ErrorAttributes;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.boat.starter.web.excepton.PageNoFindExceptonHandler;

/**
 * 启动配置
 * @author 周江
 *
 */
@Configuration
public class WebAutoConfiguration {
	/**
	 * 404错误处理。受starter加载顺序限制，此对象需要在业务系统显示集成
	 * @param errorAttributes
	 * @return
	 */
	@Bean
	public PageNoFindExceptonHandler pageNoFindExceptonHandler(ErrorAttributes errorAttributes) {
		return new PageNoFindExceptonHandler(errorAttributes);
	}
}